<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <jsp:include page="/WEB-INF/views/commons/common.jsp" />
    <script src="/static/js/system/client.js"></script>
    <title>客户管理</title>
</head>

<body>
<table id="client_datagrid"></table>
<div id="client_tb">
    <input type="hidden" name="qo" id="qo" value="${qo.state}">
    <!--rui:潜在客户工具栏-->
    <c:if test="${qo.state==0}">
        <a class="easyui-linkbutton" title="My Dialog"
           data-options="iconCls:'icon-adduser',resizable:true,plain:true" data-cmd="add">增加新客户
        </a>
        <a class="easyui-linkbutton" title="My Dialog"
           data-options="iconCls:'icon-edituser',resizable:true,plain:true" data-cmd="edit">修改客户信息
        </a>
        <a class="easyui-linkbutton" title="My Dialog" data-state="3"
           data-options="iconCls:'icon-advicemove',resizable:true,plain:true" data-cmd="changeClientState">建议转入资源池
        </a>
        <a class="easyui-linkbutton" title="My Dialog" data-state="1"
           data-options="iconCls:'icon-movetopool',resizable:true,plain:true" data-cmd="changeClientState">移入资源池
        </a>
        <a class="easyui-linkbutton" title="My Dialog"
           data-options="iconCls:'icon-moveclient',resizable:true,plain:true" data-cmd="clientTransfer">客户移交
        </a>
        <a class="easyui-linkbutton" title="My Dialog"
           data-options="iconCls:'icon-trydev',resizable:true,plain:true" data-cmd="tryDevelop">尝试开发
        </a>
    </c:if>
    <!--rui:潜在客户工具栏:END-->
    <!--rui:正式客户管理工具栏-->
    <c:if test="${qo.state==2}">
        <a class="easyui-linkbutton" title="My Dialog"
           data-options="iconCls:'icon-edituser',resizable:true,plain:true" data-cmd="edit">修改客户信息
        </a>
    </c:if>
    <!--rui:正式客户管理工具栏:END-->
    <!--rui:客户资源池工具栏-->
    <c:if test="${qo.state==1}">
        <a class="easyui-linkbutton" title="My Dialog" data-state="0"
           data-options="iconCls:'icon-maybeclient',resizable:true,plain:true" data-cmd="changeClientState">转为潜在客户
        </a>
        <a class="easyui-linkbutton" title="My Dialog"
           data-options="iconCls:'icon-edituser',resizable:true,plain:true" data-cmd="edit">修改客户信息
        </a>
    </c:if>
    <!--rui:客户资源池工具栏:END-->

    <a class="easyui-linkbutton" title="My Dialog"
       data-options="iconCls:'icon-refreshlist',resizable:true,plain:true" data-cmd="reload">刷新
    </a>
    <div>
        <span style="margin-left: 15px">创建时间:</span>
        <input id="beginDate" name="beginDate" class="easyui-datebox" style="width: 110px" />
        -<input id="endDate" name="endDate" class="easyui-datebox" style="width: 110px" />
        &nbsp;&nbsp;负责人查询&nbsp;<input name="searchManagerRealname" id="searchManagerRealname" class="easyui-textbox"
                                      data-options="prompt:'负责人'" />
        <!--//高级查询-->
        &nbsp;&nbsp;关键字查询&nbsp;<input class="easyui-textbox" type="text" name="keyword" id="keyword"
                                      prompt="客户姓名邮箱手机号" />
        &nbsp;<a class="easyui-linkbutton" data-options="iconCls:'icon-searchclient',plain:true" data-cmd="query">查询</a>
    </div>
</div>


<!--输入信息用 dialog-->`
<div id="client_dialog">
    <form id="client_form" method="post">
        <input type="hidden" id="clientId" name="id">
        <table align="center" style="border-collapse: separate;border-spacing: 10px;">
            <tr>
                <td>客户姓名</td>
                <td>
                    <input class="easyui-textbox" type="text" name="name" />
                </td>
            </tr>
            <tr>
                <td>年龄</td>
                <td>
                    <input class="easyui-textbox" type="text" name="age" />
                </td>
            </tr>
            <tr>
                <td>性别</td>
                <td>
                    <input class="easyui-combobox" type="text" name="gender" data-options="
                        valueField: 'value', textField: 'label',panelHeight: 'auto',
                        data: [{
                            label: '男',
                            value: '1'
                        },{
                            label: '女',
                            value: '0'
                        }]" />
                </td>
            </tr>
            <tr>
                <td>电话</td>
                <td>
                    <input class="easyui-textbox" type="text" name="phone" />
                </td>
            </tr>
            <tr>
                <td>邮箱</td>
                <td>
                    <input class="easyui-textbox" type="text" name="email" />
                </td>
            </tr>
            <tr>
                <td>地址</td>
                <td>
                    <input class="easyui-textbox" type="text" name="address" />
                </td>
            </tr>
            <tr>
                <td>身份证</td>
                <td>
                    <input class="easyui-textbox" type="text" name="identityCard" />
                </td>
            </tr>
            <tr>
                <td>职业</td>
                <td>
                    <input class="easyui-combobox" type="text" name="job.id"
                           id="jobId" data-options="
                        url:'/dataDictionary/selectDataBySn?sn=job',
                        valueField: 'id', textField: 'name',panelHeight: 'auto'" />
                </td>
            </tr>
            <tr>
                <td>收入水平</td>
                <td>
                    <input class="easyui-combobox" type="text" name="salaryLevel.id"
                           id="salaryLevelId" data-options="
                        url:'/dataDictionary/selectDataBySn?sn=salaryLevel',
                        valueField: 'id', textField: 'name',panelHeight: 'auto'" />
                </td>
            </tr>
            <tr>
                <td>客户来源</td>
                <td>
                    <input class="easyui-combobox" type="text" name="clientSource.id"
                           id="clientSourceId" data-options="
                        url:'/dataDictionary/selectDataBySn?sn=clientSource',
                        valueField: 'id', textField: 'name',panelHeight: 'auto'" />
                </td>
            </tr>
            <tr>
                <td>创建日期</td>
                <td>
                    <input class="easyui-datebox" type="text" name="inputTime" />
                </td>
            </tr>
        </table>
    </form>
</div>

<!--保存/取消按钮-->
<div id="dialog_btn">
    <a href="#" class="easyui-linkbutton" iconCls='icon-save8' data-cmd="save">保存</a>
    <a href="#" class="easyui-linkbutton" iconCls='icon-cancel8' data-cmd="cancel">关闭</a>
</div>


<%--paris begin--%>

<%--移交客户--%>
<div id="transferClient_dialog">
    <form id="transferClientForm" method="post" style="border-collapse: separate;padding: 60px 0px 0px 60px;">
        <table style="border-collapse: separate;border-spacing: 10px">
            <input type="hidden" name="id" id="clientIdToTrans">
            <tr>
                <td><input type="text" class="easyui-textbox" name="name"
                           data-options="iconCls:'icon-man',label:'客户姓名',width:'280'," readonly="true" /></td>
            </tr>
            <tr>
                <td><input type="text" class="easyui-textbox" name="oldOustomerManager"
                           data-options="iconCls:'icon-man',label:'原负责人',width:'280'," readonly="true"
                           disabled="true" /></td>
            </tr>
            <tr>
                <td><input type="text" class="easyui-combobox" name="newOustomerManager.id" data-options="valueField: 'id',textField: 'realname',label:'接收负责人',width:'280',iconCls:'icon-man',
                    url:'/employee/queryEmployee',panelHeight:'auto'" /></td>
            </tr>
            <tr>
                <td><input type="text" class="easyui-textbox" name="cause" labelPosition="top"
                           data-options="label:'移交原因',width:'550',multiline:true,height:'150'" /></td>
            </tr>
        </table>
    </form>
    <div id="transferClient_editbutton">
        <a class="easyui-linkbutton" data-options="iconCls:'icon-save8'" data-cmd="saveTransferClient">移交</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel8'" data-cmd="cancelTransferClient">取消</a>
    </div>
</div>


<%--移交客户--%>


<%--paris 尝试开发开发弹窗 begin--%>
<div id="clientDevelop_dialog">
    <form id="clientDevelopForm" method="post" style="border-collapse: separate;padding: 60px 0px 0px 60px;">
        <table style="border-collapse: separate;border-spacing: 10px">
            <input type="hidden" id="clientDevelop_clientId" name="client.id">
            <input type="hidden" id="clientDevelop_stateId" name="client.state">
            <tr>
                <td><input class="easyui-textbox" name="name"
                           data-options="iconCls:'icon-man',label:'客户姓名',width:'380'," readonly="true"></td>
            </tr>
            <tr>
                <td><input type="text" class="easyui-textbox" name="subject" labelPosition="top"
                           data-options="label:'开发主题',width:'550',height:'60'"></input></td>
            </tr>
            <tr>
                <td><input type="text" class="easyui-textbox" name="project" labelPosition="top"
                           data-options="label:'详细计划',width:'550',multiline:true,height:'150'"></input></td>
            </tr>
            <tr>
                <td><input type="text" class="easyui-textbox" name="comments" labelPosition="top"
                           data-options="label:'其他事项',width:'550',multiline:true,height:'150'"></input></td>
            </tr>
        </table>
    </form>
    <div id="clientDevelop_editbutton">
        <a class="easyui-linkbutton" data-options="iconCls:'icon-save8'" data-cmd="saveClientDevelop">提交</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel8'" data-cmd="cancelClientDevelop">取消</a>
    </div>
</div>
<%--paris 尝试开发开发弹窗 end--%>
<%--paris end--%>
<div style="height: 100px">
    <img src="/static/images/images/water.gif" width="100%" height="200px" />
</div>
</body>
</html>
